<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<form action="#" method="get">
    所在城市:
    <select name="city">
        <option>请选择</option>
        <optgroup label="直辖市">
            <option value="bj">北京</option>
            <option value="sh">上海</option>
        </optgroup>
        <optgroup label="省会">
            <option value="hf">合肥</option>
            <option value="nj">南京</option>
        </optgroup>
    </select>
    <input type="submit" value="提交">
</form>

</body>
</html>